//
//  DJIDroneManager.m
//  DJILogin
//
//  Created by wenpd on 2021/4/2.
//

#import "DJIDroneManager.h"
#import "DJIConnectManager.h"

@interface DJIDroneManager()

@property (nonatomic, strong) DJIConnectManager *connectManager;

@end

@implementation DJIDroneManager

+ (instancetype)shareMagager{
    static dispatch_once_t once_token;
    static DJIDroneManager *instance;
    dispatch_once(&once_token, ^{
        instance = [[DJIDroneManager alloc]init];
    });
    return instance;
}

- (instancetype)init{
    self = [super init];
    if(self){
        [self initProperty];
    }
    return self;
}

- (void)initProperty{
    _connectManager = [[DJIConnectManager alloc]init];
}

#pragma mark 一些对象
- (BOOL)isDroneConnect {
    return _connectManager.isDroneConnect;
}
- (BOOL)isM300RTK {
    return _connectManager.isM300RTK;
}
- (DJIAircraft *)aircraft {
    return _connectManager.aircraft;
}
- (DJICameraMode)cameraMode {
    return _connectManager.cameraMode;
}

- (void)setCameraMode:(DJICameraMode)cameraMode {
    _connectManager.cameraMode = cameraMode;
}


#pragma mark 信号的get方法
- (RACSubject *)aircraftSingal {
    return _connectManager.aircraftSingal;
}
- (RACSubject *)fcStateSingal {
    return _connectManager.fcStateSingal;
}
- (RACSubject *)imuStateSingal {
    return _connectManager.imuStateSingal;
}
- (RACSubject *)onBoardSingal {
    return _connectManager.onBoardSingal;
}
- (RACSubject *)rtkStateSingal {
    return _connectManager.rtkStateSingal;
}
- (RACSubject *)rtkStationSingal {
    return _connectManager.rtkStationSingal;
}
- (RACSubject *)cameraStateSingal {
    return _connectManager.cameraStateSingal;
}
- (RACSubject *)sdcardStateSingal {
    return _connectManager.sdcardStateSingal;
}
- (RACSubject *)mediaSingal {
    return _connectManager.mediaSingal;
}
- (RACSubject *)gimbalStateSingal {
    return _connectManager.gimbalStateSingal;
}
- (RACSubject *)batteryStateSingal {
    return _connectManager.batteryStateSingal;
}


@end
